package com.zhongkun.datahome.core.repository;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhongkun.datahome.common.annotation.IgnoreTenant;
import com.zhongkun.datahome.core.domain.MiniProgramDataSetting;
import com.zhongkun.datahome.core.mapper.SysMiniProgramDataSettingMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: lifengsheng
 * @Date: 2025/5/14 17:34
 * @Desc
 */
@Repository
public class SysMiniProgramDataSettingRepository extends ServiceImpl<SysMiniProgramDataSettingMapper, MiniProgramDataSetting> {

    @IgnoreTenant
    public List<MiniProgramDataSetting> listByTenantId(Long tenantId) {
        return this.list(new LambdaQueryWrapper<MiniProgramDataSetting>()
                .eq(MiniProgramDataSetting::getTenantId, tenantId));
    }
}
